<template>
  <div class="cpjyxjlBox">
    <!-------------------- 吹瓶机运行记录 -------------------->
    <TableHeader
      :data="{
        mainlabel: '吹瓶机运行记录',
        date: '2021年12月12日',
        company: '青岛崂山矿泉水有限公司',
        code: 'LK-QF-LS1-10-012-11-01',
      }"
    />
    <!-- <CommonVxeTable :tableData="tableData1" :reverse="true"/> -->
    <lb-table
      border
      :tableData="tableData1"
      :reverse="false"
      highlight-current-row
    >
    </lb-table>
    <!-- <TableHeader
      :data="{
        sublabel: '岗位自检情况',
      }"
    />
    <RowcolTableVxeTable
      :tableData="tableData2"
      :showHeader="false"
      :slots="['检查项目', '时间']"
    /> -->
    <!-- <RowColTable border :data="tableData2" /> -->
    <!-- <lb-table
      :column="tableData2.column"
      border
      :data="tableData2.data"
      :merge="['']"
    >
    </lb-table> -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData1: {
        column: [
          {
            prop: "date",
            label: "日期",
            render: (h, scope) => {
              return (
                <div>
                  <i class="el-icon-time"></i>
                  <span style="margin-left: 10px">{scope.row.date}</span>
                </div>
              );
            },
          },
          {
            prop: "name",
            label: "姓名",
            render: (h, scope) => {
              return (
                <el-popover trigger="hover" placement="top">
                  <p>姓名: {scope.row.name}</p>
                  <p>住址: {scope.row.address}</p>
                  <div slot="reference" style="display: inline-block">
                    <el-tag size="medium">{scope.row.name}</el-tag>
                  </div>
                </el-popover>
              );
            },
          },
          {
            label: "操作",
            render: (h, scope) => {
              return (
                <div>
                  <el-button
                    size="mini"
                    onClick={() => {
                      this.handleEdit(scope.$index, scope.row);
                    }}
                  >
                    编辑
                  </el-button>
                  <el-button
                    size="mini"
                    type="danger"
                    onClick={() => {
                      this.handleDelete(scope.$index, scope.row);
                    }}
                  >
                    删除
                  </el-button>
                </div>
              );
            },
          },
        ],
        data: [
          {
            date: "2016-05-02",
            name: "王小虎1",
            address: "上海市普陀区金沙江路 1518 弄",
          },
          {
            date: "2016-05-02",
            name: "王小虎2",
            address: "上海市普陀区金沙江路 1519 弄",
          },
          {
            date: "2016-05-02",
            name: "王小虎3",
            address: "上海市普陀区金沙江路 1520 弄",
          },
        ],
        align: "center",
        headerAlign: "center",
      },
      tableData2: {
        border: true,
        stripe: true,
        resizable: true,
        reverse: true,
        align: "center",
        // mergeCells:[1,2,2,4],

        columns: [
          {
            prop: "date",
            label: "时间",
          },
          {
            slots: { header: "header" },
            prop: "value1",

            label: "前炉区温度（℃）",
          },
          {
            prop: "value2",
            label: "后炉区温度（℃）",
          },
          {
            label: "模身冷却水温度（℃）",
            children: [
              {
                prop: "value3",

                label: "出水(℃)",
              },
              {
                prop: "value4",

                label: "回水(℃)",
              },
            ],
          },
          {
            label: "底模冷却水温度（℃）",
            children: [
              {
                prop: "value5",

                label: "出水(℃)",
              },
              {
                prop: "value6",

                label: "回水(℃)",
              },
            ],
          },
          {
            label: "瓶口冷却水温度（℃）",
            children: [
              {
                prop: "value7",

                label: "出水(℃)",
              },
              {
                prop: "value8",

                label: "回水(℃)",
              },
            ],
          },
          {
            prop: "value9",

            label: "坯身温度（℃）",
          },
          {
            prop: "value10",

            label: "坯口温度（℃）",
          },
          {
            prop: "value11",

            label: "高压（bar）",
          },
          {
            prop: "value12",

            label: "低压（bar）",
          },
          {
            prop: "value13",

            label: "洗坯空压气压力（MPa）",
          },
          {
            prop: "value14",

            label: "吹瓶质量",
          },
        ],
        data: [],
      },
    };
  },
  created() {
    for (let i = 0; i < 10; i++) {
      // this.tableData1.data.push({
      //   value: 12312312,
      // });
      this.tableData2.data.push({
        date: "2012-23-12",
        value1: 1111111,
        value2: 2222222,
        value3: 3333333,
        value4: 4444444,
        value5: 5555555,
        value6: 6666666,
        value7: 7777777,
        value8: 8888888,
        value9: 9999999,
        value10: 10101010,
        value11: 11111111,
        value12: 12121212,
        value13: 13131313,
        value14: 14141414,
      });
    }
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.cpjyxjlBox {
  width: 100%;
  // background: red;
}
</style>>

